<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta content=always name=referrer>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/base.css">
    <script src="__STATIC__/js/jquery-1.8.2.js"></script>
    <title>品牌街</title>
    <script>
        $(function(){
            $(".tablist li").click(
                    function(){
                        var a=$(".tablist li").index(this);
                        $(this).addClass("cur");
                        $(this).siblings().removeClass("cur");
                        $(".tabcon>div").eq(a).css({display:"block"});
                        $(".tabcon>div").eq(a).siblings().css({display:"none"});
                    }
            )
        })
    </script>
</head>
<body>
<div class="wrap-ppj">
    <div class="header">
        <p>品牌街</p>
        <img src="__STATIC__/img_user/back.png" class="back" onclick="back_url()">
    </div>
    <div class="center">
        <!--<ul class="main">-->
            <!--{volist name='category' id='v'}-->
            <!--<li>-->
                <!--<a {if condition="$v.skip_type eq 'url'"} href="{$v.linkUrl}" {else/} {if condition="$v.skip_type eq 'shop'"} href="javascript:jump_shop({$v.linkUrl});" {else/} href="javascript:jump_goods_details({$v.linkUrl});" {/if}{/if}>-->
                <!--<img src="/{$v.picUrl}" style="max-height:200px"  onerror=this.src="/static/mobile/img/empty_img.png" >-->
            <!--</li>-->
            <!--{/volist}-->
        <!--</ul>-->
        <!--<ul class="brand">-->
            <!--{volist name='tj_brand' id='v'}-->
            <!--<li><a href="javascript:jump_goods_cate({$v.id});"><img style="max-height: 70px" src="/{$v.picUrl}" onerror=this.src="/static/mobile/img/empty_img.png" ></a></li>-->
            <!--{/volist}-->
        <!--</ul>-->
        <!--<div class="all">-->
            <!--<p><a href="{:url('mobile/user_action/brand_all')}"><span>查看全部 </span><img src="__STATIC__/img_user/next.png"></a></p>-->
        <!--</div>-->
        <div class="tablist">
            <ul>
                <li {eq name="sort" value="1"}class="cur"{/eq}><span><a href="?sort=1">A-E</a></span></li>
                <li {eq name="sort" value="2"}class="cur"{/eq}><span><a href="?sort=2">F-J</a></span></li>
                <li {eq name="sort" value="3"}class="cur"{/eq}><span><a href="?sort=3">K-O</a></span></li>
                <li {eq name="sort" value="4"}class="cur"{/eq}><span><a href="?sort=4">P-T</a></span></li>
                <li {eq name="sort" value="5"}class="cur"{/eq}><span><a href="?sort=5">U-Z</a></span></li>
            </ul>
        </div>
        <div class="tabcon">
            <div class="cur">
                <ul class="brand">
                    {volist name='arr' id='v'}
                    <li><a href="javascript:jump_shop({$v.shop_id});"><img style="max-height: 70px" src="/{$v.picUrl}" onerror=this.src="__STATIC__/img/empty_img.png"></a></li>
                    {/volist}
                </ul>
            </div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<script>
    //返回
    function back_url(){
        var back_url = sessionStorage.getItem('goods_shai_url');
        if (back_url){
            window.location.href = back_url;
        }else{
            window.location.href="{:url('mobile/user_port/index')}";
        }
    }
    //跳转到店铺
    function jump_shop(id) {
        var url = "{:url('mobile/user_category/shop_index')}?shop_id="+id;
        sessionStorage.setItem('shop_back_url',window.location.href);
        window.location.href = url;
    }
    //跳转到商品详情
    function jump_goods_details(id){
        sessionStorage.setItem('goods_url_back',window.location.href);
        window.location.href = "{:url('mobile/user_category/goods_details')}?goods_id="+id;
    }
//    //跳转到商品分类
//    function jump_goods_cate(id){
//        var pass_url = sessionStorage.getItem('goods_shai_url');
//        var create_url = pass_url+"&brand_id="+id;
//        if (!pass_url){
//            sessionStorage.setItem('search_back_url',window.location.href);
//            window.location.href = "{:url('mobile/user_category/search_goods')}?brand_id="+id;
//        }else{
//            if (pass_url.indexOf('?') < 0){
//                create_url = pass_url+"?brand_id="+id;
//            }
//            window.location.href = create_url;
//        }
//
//    }
</script>
</body>
</html>